package it.sd.utility;

import java.util.HashMap;
import java.util.Iterator;

public class URLBean {

	/**
	 * @return the protocol
	 */
	public String getProtocol() {
		return protocol;
	}

	/**
	 * @param protocol
	 *            the protocol to set
	 */
	public void setProtocol(String protocol) {
		this.protocol = protocol;
	}

	/**
	 * @return the host
	 */
	public String getHost() {
		return host;
	}

	/**
	 * @param host
	 *            the host to set
	 */
	public void setHost(String host) {
		this.host = host;
	}

	/**
	 * @return the action
	 */
	public String getAction() {
		return action;
	}

	/**
	 * @param action
	 *            the action to set
	 */
	public void setAction(String action) {
		this.action = action;
	}

	public void addParam(String name, String value) {
		params.put(name, value);
	}

	private String host;
	private String action;
	private String protocol;
	private HashMap<String, String> params = new HashMap<String, String>();

	public String getParam(String name) {
		return params.get(name);
	}

	public Iterator<String> iterateParams() {
		return params.keySet().iterator();
	}
}
